package com.example.ssm.service.impl;

import com.example.ssm.mapper.BaseDictMapper;
import com.example.ssm.pojo.BaseDict;
import com.example.ssm.pojo.BaseDictExample;
import com.example.ssm.service.IBaseDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("baseDictService")
public class BaseDictServiceImpl implements IBaseDictService {
    @Autowired
    private BaseDictMapper baseDictMapper;

    @Override
    public List<BaseDict> queryBaseDictByDictTypeCode(String dictTypeCode) {
        BaseDictExample baseDictExample=new BaseDictExample();//总的查询
        BaseDictExample.Criteria criteria=baseDictExample.createCriteria();//子分支的查询
        criteria.andDictTypeCodeEqualTo(dictTypeCode);//查询条件
        return baseDictMapper.selectByExample(baseDictExample);
    }

}
